package main


import (
    nproc "github.com/toolkits/proc"
    "fmt"
    "time"
)

var (
    IndexUpdateIncr         = nproc.NewSCounterQps("IndexUpdateIncr")
)


func main(){
    IndexUpdateIncr.Incr()
    fmt.Println(IndexUpdateIncr.Get())

    time.Sleep(time.Duration(2) * time.Second)

    IndexUpdateIncr.IncrBy(int64(7))
    fmt.Println(IndexUpdateIncr.Get())
    var qps interface{}
    qps = int64(7)/2

    switch qps.(type){

    case string:
        fmt.Println("111")
    case int64:
        fmt.Println("222")
    default:
        fmt.Println("333")
    }

}
